import eslintPlugin from 'vite-plugin-eslint'
const eslintPlu = () => {
  return eslintPlugin({
    include: [
      'src/**/*.js',
      'src/**/*.ts',
      'src/**/*.tsx',
      'src/**/*.vue',
      'src/*.js',
      'src/*.ts',
      'src/*.tsx',
      'src/*.vue'
    ],
    exclude: ['./node_modules/**'],
    failOnWarning: false, // 警告导致编译失败
    failOnError: false // eslint错误是否会导致编译失败
    // cache: false // 禁用 eslint 缓存
  })
}

export default eslintPlu
